home *** CD-ROM | disk | FTP | other *** search
/ Basic Instinct 2 Press Kit / Basic Instinct 2 Press Kit.iso / pc / main.dxr / Internal_66_LogoSavedButtonCode.ls < prev    next >
Encoding:
Text File  |  2006-03-15  |  3.4 KB  |  101 lines

  1. property spriteNum, pSavedGraphic, pUnSavedGraphic, pSpriteList
  2. global gMaster, gSound
  3.  
  4. on mBeginLogoCode me
  5.   if gMaster.pLogoList.count = 0 then
  6.     alert("you have a problem with gMaster.pLogoList.count")
  7.     exit
  8.   else
  9.     repeat with x = 1 to gMaster.pLogoList.count
  10.       repeat with y = 1 to gMaster.pLogoList.count
  11.         if spriteNum = gMaster.pLogoList[y].pSaveButtonSpriteChannel then
  12.           vNum = gMaster.pLogoList[y].pSaveButtonSpriteChannel
  13.           vPosition = y
  14.           exit repeat
  15.         end if
  16.       end repeat
  17.       sendSprite(vNum, #mSetUpGraphicsDouble, "logo", vPosition)
  18.     end repeat
  19.   end if
  20. end
  21.  
  22. on mDoLogoCode me
  23.   gSound.mPlayButtonClick()
  24.   if gMaster.pLogoList.count = 0 then
  25.     alert("you have a problem with gMaster.pLogoList.count")
  26.     exit
  27.   end if
  28.   case spriteNum of
  29.     21:
  30.       vTempNum = 1
  31.     25:
  32.       vTempNum = 2
  33.     26:
  34.       vTempNum = 3
  35.     27:
  36.       vTempNum = 4
  37.   end case
  38.   if gMaster.pLogoList[vTempNum].pSelected = "no" then
  39.     mSetOn(me, vTempNum)
  40.     mSummarySelected(gMaster, gMaster.pLogoList[vTempNum].pSmallName)
  41.   else
  42.     mSetOff(me, vTempNum)
  43.     mSummaryDeSelected(gMaster, gMaster.pLogoList[vTempNum].pSmallName)
  44.   end if
  45. end
  46.  
  47. on mSetOn me, vSavedNum
  48.   gMaster.pLogoList[vSavedNum].pSelected = "yes"
  49.   mMainCode(me, vSavedNum)
  50. end
  51.  
  52. on mSetOff me, vSavedNum
  53.   gMaster.pLogoList[vSavedNum].pSelected = "no"
  54.   mMainCode(me, vSavedNum)
  55. end
  56.  
  57. on mMainCode me, vSavedNum
  58.   pSavedGraphic = member(gMaster.pLogoSettings.savedbutton, "assets")
  59.   pUnSavedGraphic = member(gMaster.pLogoSettings.savebutton, "assets")
  60.   if gMaster.pLogoSettings.blendeffect = "TRUE" then
  61.     if gMaster.pLogoList[vSavedNum].pSelected = "no" then
  62.       sprite(gMaster.pLogoList[vSavedNum].pPhotoSpriteLogo).blend = 100
  63.     else
  64.       sprite(gMaster.pLogoList[vSavedNum].pPhotoSpriteLogo).blend = gMaster.pLogoSettings.blendpercent
  65.     end if
  66.   end if
  67.   if gMaster.pLogoSettings.rectangles = "TRUE" then
  68.     if gMaster.pLogoList[vSavedNum].pSelected = "no" then
  69.       sprite(gMaster.pLogoList[vSavedNum].pRectSpriteLogo).rect = rect(-2000, -2000, -1999, 1999)
  70.     else
  71.       vLeft = sprite(gMaster.pLogoList[vSavedNum].pPhotoSpriteLogo).left - 2
  72.       vTop = sprite(gMaster.pLogoList[vSavedNum].pPhotoSpriteLogo).top - 2
  73.       vRight = sprite(gMaster.pLogoList[vSavedNum].pPhotoSpriteLogo).right + 2
  74.       vBottom = sprite(gMaster.pLogoList[vSavedNum].pPhotoSpriteLogo).bottom + 2
  75.       sprite(gMaster.pLogoList[vSavedNum].pRectSpriteLogo).rect = rect(vLeft, vTop, vRight, vBottom)
  76.     end if
  77.   end if
  78.   if gMaster.pLogoSettings.pushpin = "TRUE" then
  79.     if gMaster.pLogoList[vSavedNum].pSelected = "no" then
  80.       sprite(gMaster.pLogoList[vSavedNum].pPushPinSpriteLogo).loc = point(-2000, -2000)
  81.     else
  82.       vLeft = sprite(gMaster.pLogoList[vSavedNum].pPhotoSpriteLogo).left + gMaster.pLogoSettings.pinoffset[1]
  83.       vTop = sprite(gMaster.pLogoList[vSavedNum].pPhotoSpriteLogo).top + gMaster.pLogoSettings.pinoffset[2]
  84.       sprite(gMaster.pLogoList[vSavedNum].pPushPinSpriteLogo).loc = point(vLeft, vTop)
  85.     end if
  86.   end if
  87.   if gMaster.pLogoList.count = 0 then
  88.     alert("you have a problem with gMaster.pLogoList.count")
  89.     exit
  90.   else
  91.     repeat with y = 1 to gMaster.pLogoList.count
  92.       if spriteNum = gMaster.pLogoList[y].pSaveButtonSpriteChannel then
  93.         vNum = gMaster.pLogoList[y].pSaveButtonSpriteChannel
  94.         vPosition = y
  95.         exit repeat
  96.       end if
  97.     end repeat
  98.     sendSprite(vNum, #mSetUpGraphicsDouble, "logo", vPosition)
  99.   end if
  100. end
  101.